package ru.pb.game.network.engine;

import ru.pb.game.network.clients.AuthServerClient;
import ru.pb.game.network.threading.ThreadPoolManager;
import ru.pb.global.network.engine.NioService;
import ru.pb.global.network.engine.NioSession;
import ru.pb.global.network.engine.core.interfaces.IClientFactory;
import ru.pb.global.network.engine.core.interfaces.IPacketExecutor;
import ru.pb.global.network.engine.packets.Packet;

public class AuthServerClientFactory implements IPacketExecutor, IClientFactory<AuthServerClient>
{
	@Override
	public AuthServerClient create(NioSession<AuthServerClient> session, NioService<AuthServerClient> authServerClientNioService, IPacketExecutor ex)
	{
		return new AuthServerClient(session, authServerClientNioService, ex);
	}

	@Override
	public void executePacket(Packet run)
	{
		ThreadPoolManager.getInstance().execute(run);
	}
}
